from selenium import webdriver
from selenium.webdriver.common.by import By

name=input("请输入用户名")
mima=input("请输入密码")
fuzhereng=input("请输入负责人")
kehuming=input("请输入客户名")
shangjiname=input("请输入商机名")
yujijiage=input("请输入预计价格")
wd = webdriver.Chrome()
wd.maximize_window()
wd.get("http://localhost:88/ciircrm/index.php?m=user&a=login")
wd.find_element(By.XPATH,"/html/body/div[2]/div/div[2]/div/form/fieldset/input[1]").send_keys(name)
wd.find_element(By.XPATH,"/html/body/div[2]/div/div[2]/div/form/fieldset/input[2]").send_keys(mima)
wd.find_element(By.XPATH,"/html/body/div[2]/div/div[2]/div/form/fieldset/input[3]").click()

wd.find_element(By.LINK_TEXT,"商机").click()
wd.find_element(By.LINK_TEXT,"添加商机").click()
wd.find_element(By.ID,"owner_name").clear()
wd.find_element(By.ID,"owner_name").send_keys(fuzhereng)
wd.find_element(By.ID,"customer_name").send_keys(kehuming)
wd.find_element(By.ID,"name").send_keys(shangjiname)
wd.find_element(By.XPATH,"//*[@id='form1']/table/tbody/tr[4]/td[2]/select[1]/option[24]").click()
wd.find_element(By.XPATH,"//*[@id='form1']/table/tbody/tr[4]/td[2]/select[2]/option[7]").click()
wd.find_element(By.ID,"estimate_price").send_keys(yujijiage)
wd.find_element(By.XPATH,"//*[@id='form1']/table/tfoot/tr/td/input[1]").click()